import { deleteById, addUser, updateByUserId, getMapData } from '@/api/userAuthorityApi'

const userAuthorityBusiness = {
  actions: {
    DeleteById ({ commit }, userData) {
      return deleteById(userData).then((response) => {
        return response
      }).catch(() => {
      }).finally(() => {
      })
    },
    AddUser ({ commit }, user) {
      return addUser(user).then((response) => {
        return response
      }).catch(() => {
      }).finally(() => {
      })
    },
    UpdateByUserId ({ commit }, user) {
      return updateByUserId(user).then((response) => {
        return response
      }).catch(() => {
      }).finally(() => {
      })
    },
    GetMapData () {
      return getMapData().then((response) => {
        return response
      }).catch(() => {
      }).finally(() => {
      })
    }
  }
}

export default userAuthorityBusiness
